<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="stirring.js"></script>
</head>
<body>
    <script type="text/template" id="template1">
        <table>
            <thead>
                <tr>
                    <th>编号</th>
                    <th>姓名</th>
                    <th>性别</th>
                </tr>
            </thead>
            <tbody>
                for(let item of this){
                <tr>
                    <td>${item.id}</td>
                    <td>${item.name}</td>
                    <td>${item.sex===0?"女":"男"}</td>
                </tr>
                }
            </tbody>
        </table>
    </script>
    <script type="text/javascript">
        let model = [
            {id:1,name:"张向明",sex:1},
            {id:2,name:"蒋海艳",sex:0}
        ];
        document.querySelector("#template1")._stirring(model,true);
    </script>
</body>
</html>